/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package system;

/**
 *
 * @author Micke
 */
public class Grade {

    int movieID, userID;
    float grade;
    boolean isFavourite;

    public Grade(int movieID, int userID, float grade, boolean isFavourite) {
        this.movieID = movieID;
        this.userID = userID;
        this.isFavourite=isFavourite;
        setGrade(grade);
    }


/**
 * Returns true if a correct grade was enterd, 1-5
 * @param grade
 * @return true if correct false if a incorrect int was enterd
 */
    public boolean setGrade(float grade) {
        if (grade > 0 && grade < 6) {
                this.grade=grade;
                return true;
            }
        return false;
    }
    /**
     * Get movie id of this grade
     * @return movieID
     */
    public int getMovieID() {
        return movieID;
    }
    /**
     * return the user who owns this grade
     * @return userID
     */
    public int getUserID() {
        return userID;
    }

    public boolean isIsFavourite() {
        return isFavourite;
    }
/**
 * Returns the grade, int 1-5
 * @return grade
 */
    public float getGrade() {
        return grade;
    }



}
